package cn.tedu.community.commons.pojo.forum.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 *更新论坛DTO
 */
@Data
public class ForumUpdateDTO implements Serializable {
    /**
     *论坛标题
     */
    @NotNull(message = "请输入标题！")
    @Pattern(regexp = "([\\w\\W]{2,20}$)", message = "请输入2~20个字符的标题!")
    private String title;

    /**
     *论坛正文
     */
    @NotNull(message = "请输入内容！")
    @Pattern(regexp = "([\\w\\W]{2,1000}$)", message = "请输入2~1000个字符的内容!")
    private String content;

    /**
     *论坛图片url
     */
    private String photo;
}
